<table class="table table-bordered">
        <tbody> 
                <tr>
					<td style="background:#F5F5F5">用户账号:</td>
					<td colspan="3"><span class="label label-success">{$list.account} <input type="hidden" name="charge_uid" value="{$list.uid}" /></span></td>
				</tr>
				<tr>
					<td style="background:#F5F5F5">账户余额:</td>
					<td colspan="3"><span class="badge badge-info" >{$list.assets_total} </span></td>
				</tr>
                <tr>
					<td style="background:#F5F5F5">充值金额:</td>
					<td><div class="input-prepend input-append">
						  <span class="add-on">￥</span>
						  <input class="span2" id="charge_total" type="text">
						  <span class="add-on">.00</span>
						</div>
					</td>
				</tr>
                <tr>
					<td style="background:#F5F5F5">充值密码:</td><td><input type="password" id="charge_password"/></td>
				</tr>
				<tr>
					<td style="background:#F5F5F5">操作人备注:</td><td><textarea type="text" id="charge_remark"/></td>
				</tr>
                
        </tbody>
</table>
<p align="center"><input class="btn btn-large btn-primary" name="charge_button" type="button" onclick="chargeSubmit()" value="立即充值"/><div  align="center" id="charge_error" style="color:red"></div></p>

<script>

	function chargeSubmit(){
		var $charge_uid = getInputValueByName('charge_uid');//$("input[name = 'charge_uid']").val();
		var $charge_total = getInputValueById('charge_total');
		var $charge_password =  getInputValueById('charge_password');
		var $charge_remark = getInputValueById('charge_remark');
		$.getJSON('__APP__/Account/charge',{charge_uid:$charge_uid,charge_total:$charge_total,charge_password:$charge_password,charge_remark:$charge_remark},function(json){
			if(json.status == 1){
				$("input[name='charge_button']").val("充值成功");
			}else{
				$("input[name='charge_button']").val("充值失败"+json.data);
				document.getElementById("charge_error").innerHTML = json.info;
			}
		});
	}
</script>
